﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GuanYijia.DoMain
{
    /// <summary>
    /// 采购订单
    /// </summary>
    public class PurchaseOrder
    {
        [Key]
        //主键
        public int purchaseorderid {  get; set; }
        //供应商id
        public int? SupplierId { get; set; }
        [StringLength(100)]
        //单据编号
        public string? document_number { get; set; }
        //商品id
        public int? productid { get; set; }
        //单据日期
        public DateTime? document_date { get; set; }
        //用户id
        public int? userId { get; set; }
        //数量
        public int? quantity { get; set; }
        /// <summary>
        /// 单价
        /// </summary>
        public decimal? purchase_decimal { get; set; }
        /// <summary>
        /// 金额合计
        /// </summary>
        public decimal? sumprice { get; set; }
        //税率
        public decimal? tax_rate {  get; set; }
        //税额
        public decimal? tax_money { get; set; }
        //价税合计
        public decimal? tax_last_money {  get; set; }
        //优惠率
        public decimal? discount { get; set; }
        //优惠金额
        public decimal? discount_money { get; set; }
        //优惠后金额
        public decimal? discount_last_money { get; set; }
        //结算账户id
        public int? AccountId { get; set; }
        //支付定金
        public decimal? deposit {  get; set; }
        //状态
        public bool? status { get; set; } = false;
        //备注
        [StringLength(200)]
        public string? remark { get; set; }
        //附件
        [StringLength(200)]
        public string? annex { get; set; }

        public bool IsDel { get; set; } = false;
    }
}
